package com.example.lombokdemo.configs;

import com.example.lombokdemo.biz.ConfigBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
@ConditionalOnProperty(value = "filter.loginFilter",havingValue = "true")
public class ConditionalOnPropertyDemoConfig {
    @Bean
    public ConfigBean getConfigBean(){
        ConfigBean configBean = new ConfigBean();
        configBean.setId(111);
        return configBean;
    }
}
